<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>编辑文章</title> <#include "head.ftl" />
</head>
<body>
	<div class="body-box">
		<div class="rhead">
			<div class="rpos">当前位置: 文章管理 - 编辑</div>
			<form class="ropt">
			<input type="button" value="返回"
				onclick="location.href='${st.domain}/article/list'" />
			</form>
			<div class="clear"></div>
		</div>
		<form method="post" action="${st.domain}/article/addOrEditDo"
			id="jvForm">
			<table width="100%" class="pn-ftable" cellpadding="2" cellspacing="1"
				border="0">
				<tr>
					<td width="10%" class="pn-flabel pn-flabel-h"><span
						class="pn-frequired">*</span>标题:</td>
					<td colspan="1" class="pn-fcontent"><input type="text"
						value="${article.title}" name="title" class="required" size="25"
						maxlength="150" /></td>
				</tr>
				<tr>
					<td class="pn-flabel pn-flabel-h"><span class="pn-frequired">*</span>分类:
						<input type="hidden" id="catId" name="category.catId"
						value="${article.category.catId}"></td>
					<td colspan="1" class="pn-fcontent"><input type="text"
						id="categoryName" value="${article.category.name}"
						readonly="readonly"></td>
				</tr>
				<tr>
					<td colspan="2" class="pn-fcontent">
					<textarea name="body">${article.body}</textarea></td>
				</tr>
				<tr>
					<td class="pn-flabel pn-flabel-h">摘要:</td>
					<td colspan="1" class="pn-fcontent"><textarea cols="40"
							rows="3" name="summary" maxlength="255">${article.summary}</textarea>
					</td>
				</tr>
				<tr>
					<td colspan="4" class="pn-fbutton"><input type="hidden"
						name="articleId" value="${article.articleId}" />
						<input type="submit"
						value="提交" /> &nbsp; <input type="reset" value="重置" /></td>
				</tr>
			</table>
		</form>
	</div>
</body>
<script>
	$("#categoryName").categoryFloatPanel({
		type: 1,
		onSelect: function(treeId, treeNode) {
			$("#catId").val(treeNode.catId);
			$("#categoryName").val(treeNode.name);
		}
	});
	
	/* 编辑器 */
	
	// 指定编辑的显示高度
	CKEDITOR.config.height=450;
	// 初始化页面上的编辑器
	var editor = CKEDITOR.replace("body");
	// 编辑器绑定CKFinder
	CKFinder.setupCKEditor( editor, { basePath : g_resDomain+'/common/module/ckfinder_2.3.1/', rememberLastFolder : true } ) ;

</script>
</html>